import {ref} from 'vue'
import {defineStore} from 'pinia'


/*当前用户信息
* {
    "accountId": 17089280388,
    "displayName": "",
    "gameName": "我不是分奴",
    "internalName": "",
    "nameChangeFlag": false,
    "percentCompleteForNextLevel": 58,
    "privacy": "PUBLIC",
    "profileIconId": 5178,
    "puuid": "cb82dd7f-2b89-5b55-ab80-3e48ceab804e",
    "rerollPoints": {
        "currentPoints": 500,
        "maxRolls": 2,
        "numberOfRolls": 2,
        "pointsCostToRoll": 250,
        "pointsToReroll": 0
    },
    "summonerId": 17089280388,
    "summonerLevel": 370,
    "tagLine": "53071",
    "unnamed": false,
    "xpSinceLastLevel": 2023,
    "xpUntilNextLevel": 3456
}
* */
export const summonerInfoStore = defineStore('summonerInfoStore', () => {
    const currentSummonerInfo = ref({});
    const currentSummonerInfoProfile = ref({});

    function setCurrentSummonerInfo(summonerInfo) {
        currentSummonerInfo.value = summonerInfo;
    }

    function setCurrentSummonerInfoProfile(profile) {
        currentSummonerInfoProfile.value = profile;
    }

    return {
        currentSummonerInfo, setCurrentSummonerInfo,
        currentSummonerInfoProfile, setCurrentSummonerInfoProfile
    }
})
